<template>
    <td class="draggable-table-column">
      <!-- 通过插槽传递作用域内容 -->
      <slot v-if="scope.$scope" :scope="scope"></slot>
      <div v-if="type === 'index'">{{ scope.$index + 1 }}</div>
      <div v-else>{{ scope.value }}</div>
    </td>
  </template>
  
  <script>
  export default {
    name: 'DraggableTableColumn',
    props: {
      label: {
        type: String,
        required: false
      },
      prop: {
        type: String,
        required: false
      },
      type: {
        type: String,
        default: "default"
      }
    },
    data() {
        return {
            scope: {}
        }
    },
    computed: {
    },  
    created() {
    }
  };
  </script>
  
  <style scoped>
  .draggable-table-column {
    padding: 0 20px;
  }
  </style>
  